﻿<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/component/commonTagLib.jsp"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
<%@ include file="/WEB-INF/component/commonCSS.jsp"%>
</head>
<body class="skin-blue-light sidebar-mini fixed skin-blue-light-frame">
<div class="box box-primary" id="more" style="width:110px;height:35px;background-color:#222c32;position:absolute;z-index:9999;left:850px;top:100px;display:none;font-size:12px;border-top-color:#222c32;">
            <div class="box-body home-message" id="moreOp" >
            </div>
        </div>
	<section class="content-header">
		<h1>公示查看</h1>
		<ol class="breadcrumb">
			<li><a href="${ctx}/home.jsp"><i class="fa fa-home"></i>首页</a></li>
			<li class="active"><a href="#">分类采购</a></li>
			<li class="active"><a href="#">药品招标管理</a></li>
			<li class="active"><a href="#">资审公示管理</a></li>
			<li class="active"><a href="#">公示查看</a></li>
		</ol>
	</section>
	<section class="content">
		<div class=" box box-success">
			<div class="box-body">
				<div class=" form-inline">
                    <div class="form-group form-group-xs">
                    	<label>项目名称：</label>
							<div class="input-group">
								  <select class="form-control" id="projId" name="projId" style="width: 200px;">
								   <option value=''>请选择</option>
								  <c:forEach var="proj" items="${projNameList}" >
								  	<option value="${proj.projId}">${proj.name}</option>
		           				  </c:forEach>
		       				</div>
                    </div>
				<!-- 	<div class="form-group form-group-xs">
                    	<label>项目开启日期：</label>
							<div class="input-group">
		           				  <input class="form-control" type="text" name="startTimeStr" id="createTimeBegin"   placeholder="yyyy-MM-dd"
                                  onFocus="var endDate=$dp.$('crateTimeEnd');WdatePicker({maxDate:'#F{$dp.$D(\'crateTimeEnd\')}'})" />
		       				</div>
                    	<label>-</label>
							<div class="input-group">
		           				 <input class="form-control" type="text" name="endTimeStr" id="crateTimeEnd"   placeholder="yyyy-MM-dd"
                       				onFocus="WdatePicker({minDate:'#F{$dp.$D(\'createTimeBegin\')}'})" />
		       				</div>
                    	</div> -->
                    <input type="button" id="selectDicCompType" onclick="likeQuery();" class="btn btn-success btn-sm" value="查  询">
                </div>
            </div>
        </div>
		<table class="jqgrid" id="gridlist"></table>
		<div id="gridpage"></div>
		<div class=" box box-warning bottongroup">
			<label id="allOk" class="btn btn-default btn-sm" onclick='javascript:history.go(-1)'>返    回</label>
		</div>

    </section>
    <%@ include file="/WEB-INF/component/commonJS.jsp"%>
    <script type="text/javascript">
        $(function () {
            $("#gridlist").jqGrid({
                url: "${ctx}/bidPubSettings/getListCheckByCenter.html",
                mtype: "POST",
                datatype: "json",
                autowidth: true,
                height: 270,                   	
                colNames: ['公示名称','公示执行人','公布日期','项目名称','项目创建日期','操作'],
                colModel: [
						{ name: 'scriptName', width: "10%",align: 'center',sortable: false},		
						{ name: 'execUser', width: "15%",align: 'center' ,sortable: false},
						{ name: 'execDatetime', width: "11%",align: 'center',sortable: false,
							formatter : function(val, opts, rowdata) {
								return new Date(val).format("yyyy-MM-dd");
							}
						},
						{ name: 'name', width: "10%", align: 'center',sortable: false},
						{ name: 'createDatetime', width: "10%",align: 'center',sortable: false,
							formatter : function(val, opts, rowdata) {
								return new Date(val).format("yyyy-MM-dd");
							}
						},
						{ name: 'operate', width: "15%",align: 'center',sortable: false,
							formatter : function(val, opts, rowdata) {
								  var str = "";                    
								  str +="<a target='_blank' href='/medstgmini/bidPubSettings/toDetailResult.html?bidPubSettingsId="+rowdata.bidPubSettingsId+"' >执行结果</a>";
		                            return str;

							}
						}
					
                ],
                rowNum: 20,
                rowList: [10, 20, 50,100],
                rownumbers: true,
                pager: "#gridpage",
                viewrecords: true,
                caption: "采购项目列表",
                jsonReader: {
                	repeatitems: false,
                	id: "compRegId"
                }
            });
            $("#gridlist").jqGrid('navGrid', '#gridpage', { add: false, edit: false, del: false, search: false, refresh: false });
        });
        
        function likeQuery(){
        // 	var startDate  = $.trim($("#createTimeBegin").val());
       	//    var endDate = $.trim($("#crateTimeEnd").val()); 
       		var projId = $.trim($("#projId").val());
	       	$("#gridlist").jqGrid('setGridParam', {
	       		mtype:"post",
	       		postData:{
	       			"projId":projId
			    },
	       	    page: 1 
	       }).trigger("reloadGrid");
       }
       
    
    
    </script>
</body>
</html>